<?php
$tmp = $v['uri_where'];
unset($tmp['page_num']);
unset($tmp['order_by']);
$s = '';
foreach($tmp as $name=>$value)
{
	if($value!=0)
	{
		$s .= $name . '=' . $value .'&';
	}
}
$page_size = ConfigParser::get('fd','products_preview_page_size');
if((!isset($v['uri_where']['page_num']))||empty($v['uri_where']['page_num']))
{
	$page_num = 1;
}
else
{
	$page_num = $v['uri_where']['page_num'];
}
$limit_start = (intval($page_num) - 1)*$page_size;
$limit_size = $page_size;
$s .= 'limit_start=' . $limit_start . '&';
$s .= 'limit_size=' . $limit_size . '&';
if($v['uri_where']['order_by']!=0)
{
	$s .= 'order_by=' . $v['uri_where']['order_by'] . '&';
}
$v['products_preview'] = FdHelper::getFromApi($uri_data['written_language_tag'] . '/products/' . $uri_data['category_name'] . '/basic/?' . $s);

//$output[] = 'products_preview';
?>
